<div class="indextop">

<div class="randomgames">
<?php if (have_posts()) : ?>

<div class="randomtop2">
<h2><?php the_title(); ?></h2>
</div>

<div class="randomgame">

<?php while (have_posts()) : the_post(); ?>
<div class="game">
<object type="application/x-shockwave-flash" width="590" height="430" data="<?php $values = get_post_custom_values("game"); echo $values[0]; ?>"><param name="movie" value="<?php $values = get_post_custom_values("game"); echo $values[0]; ?>" /></object>	
</div>

<?php endwhile; ?>

</div>

<div class="randombottom"></div>

<div class="randomtop3"></div>
<div class="randomgame">
<div class="ratings">
Category: <?php the_category(', ') ?>
</div>
<div class="fullscreen">
<a href="<?php $values = get_post_custom_values("game"); echo $values[0]; ?>" target="_blank">Full Screen</a>
</div>
</div>
<div class="randombottom"></div>

<?php endif; ?>
</div>
<div class="ad336">
<h2>Game Info: <?php the_title(); ?></h2>
<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
<h2>How to Play:</h2>
<p><?php $values = get_post_custom_values("howto"); echo $values[0]; ?></p>
<?php the_tags( '<p><strong>Tags:</strong> ', ', ', '</p>'); ?>
</div>

<?php include (TEMPLATEPATH . '/ads/ad-336-280.php'); ?>

</div>

<div class="singlebottom">

<div class="randomtop4"><h2>Try These Games!</h2></div>

<div class="randomgame4">

<?php $recent = new WP_Query("cat=&showposts=16&orderby=rand"); while($recent->have_posts()) : $recent->the_post();?>
<div class="gamethumb4">

<div class="thumbs">
<a href="<?php the_permalink() ?>" title="Play <?php the_title_attribute(); ?>"><img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="" height="80" width="96" /></a>
</div>
<div class="thumbtitle">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Play <?php the_title_attribute(); ?>"><?php
$tit = the_title('','',FALSE);
echo substr($tit, 0, 15);
if (strlen($tit) > 15) echo " ...";
?></a>
</div>
</div>
<?php endwhile; ?>

</div>

<div class="randombottom4"></div>

</div>

<?php get_footer(); ?>
